<!--<?php
include_once PrintEot('left');
print <<<EOT
-->
<div class="nav3 mb10">
    <ul id="basictype" class="cc">
        <li><a href="$basename" hidefocus="true">楼盘管理</a></li>
		<li class="current"><a href="$basename&action=edit&hid=$hid" hidefocus="true">编辑楼盘</a></li>
    </ul>
</div>
<div class="nav4 mb10">
    <ul class="cc">
        <li><a href="$basename&action=edit&hid=$hid" hidefocus="true">基本信息</a></li>
		<li><a href="$basename&action=album&hid=$hid" hidefocus="true">相册</a></li>
		<li class="current"><a href="$basename&action=video&hid=$hid" hidefocus="true">视频</a></li>
		<li><a href="$basename&action=map&hid=$hid" hidefocus="true">地图</a></li>
		<li><a href="$basename&action=pricedetail&hid=$hid" hidefocus="true">价格明细</a></li>
		<li><a href="$basename&action=feed&hid=$hid" hidefocus="true">楼盘动态</a></li>
		<li><a href="$basename&action=colony&hid=$hid" hidefocus="true">关联业主小区</a></li>
		<li><a href="$basename&action=information&hid=$hid" hidefocus="true">关联资讯</a></li>
		<li><a href="$basename&action=nav&hid=$hid" hidefocus="true">自定义导航</a></li>
		<li><a href="admin.php?adminjob=mode&admintype=house_groupbuy&hid=$hid" hidefocus="true">团购管理</a></li>
		<li><a href="admin.php?adminjob=mode&admintype=house_evaluation&hid=$hid&action=score" hidefocus="true">评价管理</a></li>
	</ul>
</div>
<!--
EOT;
if (empty($type)) {print <<<EOT
-->

<style>
.admin-img li{float:left;width:150px;height:210px;line-height:16px;}
.admin-img li img{width:100px;height:100px;padding:5px;border:1px solid #ccc;background:#fff;}
</style>


<h2 class="h1"><span class="mr10 fl">视频管理</span> <span class="linka fl"><a href="#" onclick="addVideo();return false;" class="btn_add"><i>添加视频</i></a></span></h2>
<form action="$_basename" method="post">
<input type="hidden" name="type" value="deletevideos" >
<div class="mb10">
<ul class="admin-img tac cc" style="margin-top:5px">
<!--
EOT;
foreach ($videos as $key => $video) {print <<<EOT
-->
		<li id="video_{$video[id]}">
			<a href="$video[url]" target="_blank">
				<img src="$video[mini]" border="0" class="vphoto" />
			</a>
			<p id="descrip_{$video[id]}">&nbsp;$video[descrip]</p>
			<p>$video[uploadtime]</p>
			<p>
			<span class="mr10">
				<a href="#" onclick="editVideo('$video[id]',this);" >
					[编辑]
				</a>
			</span>
			<span class="mr10">
				<a href="#" onclick="delVideo('$video[id]');">
					[删除]
				</a>
			</span>
			</p>
			<p>选中 <input type="checkbox" name="select[]" value="$video[id]"></p>
		</li>
<!--
EOT;
}print <<<EOT
-->
</ul>
	
</div>
<div class="mt10 cc">$pages</div>
<div class="mb10 tac">
	<span class="bt"><span><button onfocus="blur();" onclick="selectAll('select[]')" type="button">全选</button></span></span>
	<span class="btn"><span><button type="submit" onfocus="blur();">删除</button></span></span>
</div>
</form>
<script src="js/pw_ajax.js" language="JavaScript"></script>
<script src="js/global.js" language="JavaScript"></script>
<script language="javascript">
function addVideo() {
	var url = "$ajax_basename";
	ajax.send(url,'type=add',ajax.get);
}
function editVideo(id) {
	var url = "$ajax_basename";
	ajax.send(url,'type=edit&id='+id,ajax.get);
}

function delVideo(id){
	if (!confirm("确定要删除此视频吗？")){
		return false;
	}
	var url = "$ajax_basename";
	ajax.send(url,'type=delete&id='+id,function(){
		var rText = ajax.request.responseText.split("|");
		if (rText[0] == 'success') {
			var element = document.getElementById('video_'+id);
			if (element) {
				showDialog('success','操作成功!',1);
				element.parentNode.removeChild(element);
			} else {
			}
		} else {
			ajax.guide();
		}
	});
}

~
function () {
	var ischeck = 'checked';
	selectAll = function (name) {
		var temp = document.getElementsByName(name);
		if (temp.length < 1) return null;
		for (var i=0 ; i<temp.length;i++) {
			temp[i].checked = ischeck;
		}
		ischeck = ischeck ? false : 'checked';
	}
}()
</script>
<!--
EOT;
} elseif ($type=='upload') {print <<<EOT
-->
<script type="text/javascript" language="JavaScript" src="js/global.js"></script>
<script type="text/javascript" language="JavaScript" src="js/core/core.js"></script>
<script type="text/javascript" language="JavaScript" src="mode/house/js/flash.js"></script>
<div id="content_main" class="fr">
	<div style="padding-right:20px;">
	<div class="photo-two">
		<div>

			<select name="aid" style="width:200px;" id="aidsel_info" onchange="photoflashAtt.getaid(this.value);">
<!--
EOT;
foreach ($topTypes as $key => $top) {
print <<<EOT
-->
    <option value="$key">$top[name]</option>
<!--
EOT;
if($secendTypes[$key]){
foreach ($secendTypes[$key] as $k=>$secend) {
print <<<EOT
-->
	<option value="$k">&nbsp; &nbsp;|-$secend[name]</option>
<!--
EOT;
}}print <<<EOT
-->
<!--
EOT;
}print <<<EOT
-->
			</select>
		</div><br />
		<dl class="cc">
			<dd>
				<div>
					<div id="viewimg" class="menu" style="display:none;"></div>
					<div id="attsize" style="margin-top:10px"></div>
				</div>
			</dd>
		</dl>
	</div>
    </div>
</div>
<script language="JavaScript">
var baseUrl = '$db_bbsurl';
photoflashAtt.baseurl = baseUrl+'/{$houseBaseUrl}q=upload&hid=$hid';

photoflashAtt.flashvar = 'url=' + escape(baseUrl + '/{$houseBaseUrl}q=upload&hid=$hid');
window.onReady(photoflashAtt.init);
</script>
<!--
EOT;
} elseif ($type=='upload1') {print <<<EOT
-->
<form action="$_basename" method="post" name="form" enctype="multipart/form-data">
<input type="hidden" name="step" value="2" >
<input type="hidden" name="type" value="upload" >
<table width="100%" cellspacing="0" cellpadding="0">
	<tbody>
	<tr>
	<td colspan="3">
<span class="fl fn mr10">
所属相册：
<select class="select_wa" name="typeid">
<!--
EOT;
foreach ($topTypes as $key => $top) {print <<<EOT
-->
    <option value="$key">$top[name]</option>
<!--
EOT;
if($secendTypes[$key]){
foreach ($secendTypes[$key] as $k=>$secend) {
print <<<EOT
-->
	<option value="$k">&nbsp; &nbsp;|-$secend[name]</option>
<!--
EOT;
}}print <<<EOT
-->
<!--
EOT;
}print <<<EOT
-->
</select>
</span>
	</td>
	</tr>
	<tr>
		<td>上传图片</td>
		<td>
			<input id="uploadpic" type="file" name="uploadpic" onchange="checkFileType()">（允许类型：jpg，jpeg，gif，png）
			<span id="fileTypeError" style="display:none;"><font color="red">请选择正确的文件类型</font></span>
		</td>
	</tr>
	</tbody>
</table>

<div class="mb10 tac"><span class="btn2"><span><button type="submit" onfocus="blur();">提 交</button></span></span></div>
</form>

<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->